//对外暴露配置路由(常量路由):全部用户都可以访问到的路由
export const constantRoute = [
  {
    //登录成功以后展示数据的路由
    path: "/",

    redirect: "/home",
    children: [
      {
        path: "/home",
        component: () => import("@/views/home/index.vue"),
        meta: {
          title: "首页",
          hidden: false,
        },
      },
    ],
  },
  {
    //登录成功以后展示数据的路由
    path: "/gudience",
    component: () => import("@/views/guidence/index.vue"),
    meta: {
      title: "ai导诊",
      hidden: false,
    },
  },
  {
    //登录成功以后展示数据的路由
    path: "/text",
    component: () => import("@/views/guidence/inputText/index.vue"),
    meta: {
      title: "文字输入",
      hidden: false,
    },
  },
  {
    //登录成功以后展示数据的路由
    path: "/voice",
    component: () => import("@/views/guidence/Voice/index.vue"),
    meta: {
      title: "语音输入",
      hidden: false,
    },
  },
  {
    //登录成功以后展示数据的路由
    path: "/symptom",
    component: () => import("@/views/symptom/index.vue"),
    meta: {
      title: "症状导医",
      hidden: false,
    },
  },
  {
    //登录成功以后展示数据的路由
    path: "/symCategory",
    component: () => import("@/views/symptom/components/symCategory.vue"),
    meta: {
      title: "症状分类",
      hidden: false,
    },
  },
  {
    //登录成功以后展示数据的路由
    path: "/symReult",
    component: () => import("@/views/symptom/components/symResult.vue"),
    meta: {
      title: "症状结果",
      hidden: false,
    },
  },
  {
    //登录成功以后展示数据的路由
    path: "/departments",
    component: () => import("@/views/departments/index.vue"),
    meta: {
      title: "科室列表",
      hidden: false,
    },
  },
  {
    //登录成功以后展示数据的路由
    path: "/departIntroduce",
    component: () =>
      import("@/views/departments/components/departIntroduce.vue"),
    meta: {
      title: "科室介绍",
      hidden: false,
    },
  },
  {
    //登录成功以后展示数据的路由
    path: "/location",
    component: () => import("@/views/location/index.vue"),
    meta: {
      title: "位置导航",
      hidden: false,
    },
  },
  {
    //404
    // path: '/404',
    //这里把path改为任意路径，防止后期使用异步路由时控制台报错：
    //[Vue Router warn]: No match found for location with path “xxxxx“
    path: "/:catchAll(.*)",
    component: () => import("@/views/404/index.vue"),
    name: "404",
    meta: {
      title: "404",
      hidden: true,
    },
  },
];

//异步路由
export const asyncRoute = [
  /*  {
    path: "/product",
    component: () => import("@/layout/index.vue"),
    name: "Product",
    meta: {
      title: "商品管理",
      icon: "Goods",
    },
    redirect: "/product/trademark",
    children: [
      {
        path: "/product/trademark",
        component: () => import("@/views/product/trademark/index.vue"),
        name: "Trademark",
        meta: {
          title: "品牌管理",
          icon: "ShoppingCartFull",
        },
      },
      {
        path: "/product/attr",
        component: () => import("@/views/product/attr/index.vue"),
        name: "Attr",
        meta: {
          title: "属性管理",
          icon: "ChromeFilled",
        },
      },
      {
        path: "/product/spu",
        component: () => import("@/views/product/spu/index.vue"),
        name: "Spu",
        meta: {
          title: "SPU管理",
          icon: "Calendar",
        },
      },
      {
        path: "/product/sku",
        component: () => import("@/views/product/sku/index.vue"),
        name: "Sku",
        meta: {
          title: "SKU管理",
          icon: "Orange",
        },
      },
    ],
  }, */
];

//任意路由
export const anyRoute = [
  {
    //任意路由
    path: "/:pathMatch(.*)*",
    redirect: "/404",
    name: "Any",
    meta: {
      title: "任意路由",
      hidden: true,
    },
  },
];
